<template>
  <el-pagination
    style="text-align: right; margin-top: 20px"
    background
    @size-change="handleSizeChange"
    @current-change="handleCurrentChange"
    layout="prev, pager, next ,sizes,jumper"
    :total="counts"
    :page-size="+data.pagesize"
    :page-sizes="n"
    :current-page="+data.page"
  >
  </el-pagination>
</template>

<script>
export default {
  name: 'elpagination',
  components: {},
  props: {
    data: {
      type: Object
    },
    counts: {
      type: [Number, String],
      required: true
    },
    n: {
      type: Array,
      required: true
    }
  },
  data() {
    return {}
  },
  created() {},
  methods: {
    handleSizeChange(val) {
      this.$emit('handleSizeChange', val)
    },
    handleCurrentChange(val) {
      this.$emit('handleCurrentChange', val)
    }
  }
}
</script>

<style scoped >

</style>